package com.cdshangpai.utils.system;

import android.content.res.Resources;

public class ScreenParams {
    public static Integer screenWidth;
    public static Integer screenHeight;
    public static Integer colums=4;//列表显示列数
//    public static Integer margin=40;//列表item 间距
    public static Integer rowmargin=80;
    public static Integer colmargin=20;//列间距
    public static Integer iconWidth=0;//列表图片宽度
    public static Integer iconHeight=0;//列表图片高度
    public static Integer listMargin=60;//列表外左右编剧
    public static Integer listBottomMargin=100;//列表底部编剧

    public static void pickScreenParams()
    {
        screenHeight=Resources.getSystem().getDisplayMetrics().heightPixels;
        screenWidth=Resources.getSystem().getDisplayMetrics().widthPixels;
        if(screenWidth<screenHeight)
        {
            Integer temp=screenWidth;
            screenWidth=screenHeight;
            screenHeight=temp;
        }

        iconWidth=(screenWidth-listMargin*2)/colums-colmargin*2;
        iconHeight=(int)(iconWidth*2/3);
    }
}
